<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Transform-2</title>
    <style>

        div{
            width: 0;
            height: 0;
            position: relative;
            background-color: rebeccapurple;
            animation:mymove 5s infinite;
            -webkit-animation: mymove 5s infinite; /* Safari and Chrome */
        }

        @keyframes mymove
        {
            0%   {top:0; left:0; background: red; width:0;}
            50%  {top:100px; left: 100px; width: 100px; height:100px; background:green;}
            100%   {top:0; left:300px; background: red; width:0;}
            /*100% {top:200px; left: 200px; width: 200px; height:200px; background:red; }*/
        }

        @-moz-keyframes mymove /* Firefox */
        {
            0%   {top:0; background:red; width:100px;}
            50%  {top:100px; background:green; width:200px;}
            100% {top:200px; background:yellow; width:400px;}
        }

        @-webkit-keyframes mymove /* Safari and Chrome */
        {
            0%   {top:0; background:red; width:100px;}
            50%  {top:100px; background:green; width:200px;}
            100% {top:200px; background:yellow; width:400px;}
        }

        @-o-keyframes mymove /* Opera */
        {
            0%   {top:0; background:red; width:100px;}
            50%  {top:100px; background:green; width:200px;}
            100% {top:200px; background:yellow; width:400px;}
        }
    </style>
</head>
<body>
    <div>

    </div>
</body>
</html>